package com.vids.model.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 *   联网服务对象
 * </p>
 *
 * @author ly
 */
@TableName("t_VIID_Server")
public class VIIDServer extends Model<VIIDServer> {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId(value = "id", type = IdType.AUTO)
    @JsonIgnore
    private Integer id;

    /**
     * 该服务器标识符，中文统称设备 ID
     */

    @TableField("VIIDServerID")
    private String VIIDServerID;

    // string(0..100) 设备名称

    @TableField("ServerName")
    private String ServerName;

    // IPAddrType string(0..30) IP地址 R

    @TableField("IPAddr")
    private String IPAddr;

    // IPV6AddrType string(64) IPv6地址 O

    @TableField("IPV6Addr")
    private String IPV6Addr;

    // int R

    @TableField("Port")
    private Integer Port;

    /**
     *
     * DeviceIDType string(20) 采集设备、卡口点位、采集系统、分析系统、视图库、应用平台等设备编码规则 R
     * 即设备ID，可多个如：123456;456123;568789
     */

    @TableField("UpServerID")
    private String UpServerID;
    /**
     * DeviceIDType string(20) 采集设备、卡口点位、采集系统、分析系统、视图库、应用平台等设备编码规则 O 即设备ID，可多个
     */

    @TableField("SubServerID")
    private String SubServerID;

    /**
     * StatusType string(1) 视频设备工作状态:1在线、2离线、9其他 O 服务器是否在线
     */

    @TableField("IsOnline")
    private String IsOnline;
    /**
     * 服务器最后保活时间 O
     */
    @JsonFormat(pattern = "yyyyMMddHHmmss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyyMMddHHmmss")
    @TableField("LastOnlineTime")
    private Date LastOnlineTime;

    @Override
    public Serializable pkVal() {
	return this.VIIDServerID;
    }

    @Override
    public String toString() {
	return "TViidServer{" + ", VIIDServerID=" + VIIDServerID + ", ServerName=" + ServerName + ", IPAddr=" + IPAddr
		+ ", IPV6Addr=" + IPV6Addr + ", Port=" + Port + ", UpServerID=" + UpServerID + ", SubServerID="
		+ SubServerID + ", IsOnline=" + IsOnline + ", LastOnlineTime=" + LastOnlineTime + "}";
    }

    public Integer getId() {
	return id;
    }

    public void setId(Integer id) {
	this.id = id;
    }

    @JsonProperty("VIIDServerID")
    public String getVIIDServerID() {
	return VIIDServerID;
    }

    public void setVIIDServerID(String VIIDServerID) {
	this.VIIDServerID = VIIDServerID;
    }

    @JsonProperty("ServerName")
    public String getServerName() {
	return ServerName;
    }

    public void setServerName(String serverName) {
	ServerName = serverName;
    }

    @JsonProperty("IPAddr")
    public String getIPAddr() {
	return IPAddr;
    }

    public void setIPAddr(String IPAddr) {
	this.IPAddr = IPAddr;
    }

    @JsonProperty("IPV6Addr")
    public String getIPV6Addr() {
	return IPV6Addr;
    }

    public void setIPV6Addr(String IPV6Addr) {
	this.IPV6Addr = IPV6Addr;
    }

    @JsonProperty("Port")
    public Integer getPort() {
	return Port;
    }

    public void setPort(Integer port) {
	Port = port;
    }

    @JsonProperty("UpServerID")
    public String getUpServerID() {
	return UpServerID;
    }

    public void setUpServerID(String upServerID) {
	UpServerID = upServerID;
    }

    @JsonProperty("SubServerID")
    public String getSubServerID() {
	return SubServerID;
    }

    public void setSubServerID(String subServerID) {
	SubServerID = subServerID;
    }

    @JsonProperty("IsOnline")
    public String getIsOnline() {
	return IsOnline;
    }

    public void setIsOnline(String isOnline) {
	IsOnline = isOnline;
    }

    @JsonProperty("LastOnlineTime")
    public Date getLastOnlineTime() {
	return LastOnlineTime;
    }

    public void setLastOnlineTime(Date lastOnlineTime) {
	LastOnlineTime = lastOnlineTime;
    }
}
